clear all

** Set working directory: please set your own
/*
cd "~/Dropbox/sanctions_replication/"
*/
** Open dataset
use data/survey_clean.dta, clear

** Run the analyses
* Physical sanctions
regr intent_phis_up_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_physical_up

* Verbal sanctions
regr intent_verb_up_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_verbal_up

* Insult sanctions
regr intent_insult_up_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_insult_up

* Direct sanctions (PCA)
regr pca_direct_up right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store vote_direct_up

* Deny help
regr intent_deny_up_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_deny_up

* Avoid interaction
regr intent_avoid_up_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_avoid_up

* Gossip
regr intent_gossip_up_num right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_gossip_up

* Indirect sanctions (PCA)
regr pca_indirect_up right_minus_left_ccaa female_dummy age_calculated college spanish, r
est store  vote_indirect_up

* Make table for Podemos
esttab vote_physical_up vote_verbal_up vote_insult_up vote_direct_up vote_deny_up vote_avoid_up vote_gossip_up vote_indirect_up  ///
using tables/tableb15.tex, tex nonumber ///
mtitles("Physical" "Verbal" "Insult" "Direct sanctions (PCA)" "Deny help" "Avoid interaction" "Gossip" "Indirect sanctions (PCA)" ) ///
coeflabels(right_minus_left_ccaa "Difference between right and left vote share in region" ///
female_dummy "Female (dummy)" age_calculated "Age" college "College" spanish "Spanish" _cons "Constant") se ///
replace addnotes("Standard errors are robust")
